const KEY='KEY_PRO_INFO';
const NEW_ASSURE_ITEMS_KEY='NEW_ASSURE_ITEMS';
//存储商品基本信息
export function getProInfo() {
    var jsonString = sessionStorage.getItem(KEY);
    jsonString = jsonString || '{}';
    return JSON.parse(jsonString);
}

export function setProInfo(form) {
    removeProInfo();
    sessionStorage.setItem(KEY,JSON.stringify(form));
}

export function removeProInfo() {
    sessionStorage.removeItem(KEY);
}

export function getAssures() {
    var jsonString = sessionStorage.getItem(NEW_ASSURE_ITEMS_KEY);
    jsonString = jsonString || '{}';
    return JSON.parse(jsonString);
}

export function setAssures(obj) {
    removeProInfo();
    sessionStorage.setItem(NEW_ASSURE_ITEMS_KEY,JSON.stringify(obj));
}

export function removeAssures() {
    sessionStorage.removeItem(NEW_ASSURE_ITEMS_KEY);
}